import { $get, $postB } from 'sence/modules/request'
import { $setCache } from 'sence/modules/storage'

export function getDictModule(code) {
	return $get("/dict/get-module", { code }, false)
}
export function login2wx(code) {
	return new Promise(resove => {
		wx.login({
			success: async ({ code }) => {
				let { data } = await $postB('/wx/login', { code }, false);
				$setCache('SESSION', data)
				resove(data)
			}
		})
	})
}
